package com.tanhua.sso.controller;

import cn.hutool.core.convert.Convert;
import com.tanhua.sso.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;
    @RequestMapping("/loginVerification")
    public Object loginVerification(@RequestBody Map<String,Object> param){

        String phone = Convert.toStr(param.get("phone"));
        String verificationCode = Convert.toStr(param.get("verificationCode"));
        return this.userService.loginVerification(phone,verificationCode);
    }
}
